class person {
    constructor() {
        this.list = this.$('#list');
        this.lists = this.list.children;
        this.content = this.$('#content');
        this.contents = this.content.children;
        this.mousemove()
    }
    $ = selector => document.querySelector(selector)
    mousemove() {
        for (let i = 0; i < this.lists.length; i++) {
            let index = i
            this.lists[i].onclick = () => {
                for (let j = 0; j < this.lists.length; j++) {
                    this.lists[j].className = ""
                    this.contents[j].style.display = "none"
                }
                this.contents[i].style.display = "block"
                this.lists[i].className = "bg"
            }
        }
    }

}
let c = new person()